import { http } from "@/utils/http";
import type { HttpResult } from "@/utils/http/types";

export function addMessage(params) {
  return http.request<HttpResult>("post", "/admin/message/insert", {
    data: params
  });
}

export function updateCloseMessage(params) {
  return http.request<HttpResult>("post", "/admin/message/update/close", {
    data: params
  });
}

export function queryMessageTable(params) {
  return http.request<HttpResult>("get", "/admin/message/get/table", {
    params: params
  });
}

export function queryMessage(id) {
  return http.request<HttpResult>("get", `/admin/message/get/${id}`);
}

export function queryMessageList(params) {
  return http.request<HttpResult>("get", "/admin/message/get/list", {
    params: params
  });
}
